const originalData = {
    name: '小李'
};
export default function nameRenducer(state = originalData, action) {
    switch (action.type) {
        case 'changeName':
            const resName = action.name ? action.name : state.name;
            return { ...state, ...{ name: resName } };
        default:
            return state;
    }
}
